package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.weixing.mall.provider.model.domain.Category;
import com.weixing.mall.provider.model.query.CategoryQuery;
import com.weixing.mall.provider.model.vo.CategoryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品模块-商品类目表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-20
 */
public interface CategoryMapper extends BaseMapper<Category> {

    /**
     * @Description 按照名称查询类目 <br/>
     * @author gjq
     * @date 2019/8/6 15:21
     * @param catName
     * @return java.util.List<com.weixing.mall.provider.model.vo.CategoryVo>
     */
   List<CategoryVo> findByName(String  catName);

    /**
     * @Description 条件查询商品类目 <br/>
     * @author gjq
     * @date 2019/8/6 15:21
     * @param categoryQuery
     * @return java.util.List<com.weixing.mall.provider.model.vo.CategoryVo>
     */
    List<CategoryVo> selectList(@Param(value = "qs")CategoryQuery categoryQuery);



    /**
     * @Description 改变类目状态 <br/>
     * @author gjq
     * @date 2019/8/7 14:56
     * @param categoryId
     * @Param: status
     * @return void
     */
    void changeEnable(@Param(value = "categoryId") long categoryId, @Param(value = "value") int value);
    /**
     * @Description 通过id删除商品类目 <br/>
     * @author gjq
     * @date 2019/8/8 14:42
     * @param id
     * @return int
     */
    int delById(@Param(value = "id") long id);

    List<CategoryVo> selectListAll();
}